﻿Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports Lourdes.BackEnd.Modelo

Public Class test
  Public Shared Function prueba() As DataTable
    Dim dt As New DataTable
    Dim dr As DataRow


    Dim cont As New LourdesEntities
    dt.Columns.Add("Nombre", GetType(String))
    dt.Columns.Add("Apellido", GetType(String))


    Dim resu = (From p In cont.Persona Select New With {.Nombre = p.Nombre, .Apellido = p.Apellido}).ToList

    dt = (From r In resu Select dt.LoadDataRow(New Object() {r.Nombre, r.Apellido}, False)).ToList.CopyToDataTable

    'Dim dtFinal = (From r In resu Select dtResu.LoadDataRow(New Object() {r.EitCantDormitorios, r.EitOperacion, r.ImgRuta, _
    '                                                                      r.EitTipoMoneda, r.AinTitulo, _
    '                                                                      r.AinPrecio, r.AinId, _
    '                                                                      r.LocNombre, r.BrrNombre}, False)).ToList.CopyToDataTable


    Return dt

  End Function
End Class
